home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 142 (1990-08-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 142 (1990-08-15)(Ossowski, Stefan)(DE)(PD).adf / Mostra / Mostra.doc < prev    next >
Text File  |  1990-05-15  |  19KB  |  422 lines

  1.  
  2.  
  3.  
  4.                                 Mostra
  5.  
  6.                         A Universal IFF Viewer
  7.  
  8.  
  9.  
  10. There are many utilities for viewing IFF ILBM files, but none I'd seen
  11. until now met the goal of displaying every IFF picture; each had its
  12. idiosyncrasies.  If one viewer could display overscan pictures, then
  13. every picture with more than 640 pixels on a line would be shifted
  14. like there were 700 pixels; some programs could only show a directory
  15. of pictures by forcing the user to enter all the filenames; some
  16. programs would crash with PAL pictures; others would do the same with
  17. pictures larger than any screen; it was rare to have an option to
  18. force a screen mode (for the tech-folks out there:  old IFF ILBM files
  19. don't have the CAMG chunk!); there were no comfortable file requesters
  20. for use when you didn't know the exact name of the file (who can
  21. remember GRABBiT file names?); pressing the right mouse button could
  22. cause a useless drag bar to corrupt the picture...
  23.  
  24. If a program had one feature, it lacked another, so I decided to write
  25. a show utility.  I never would have succeeded without the best friend
  26. of an Amiga programmer:  the ARP library.  If I have been able to
  27. write Mostra, it's only to ARP's credit.  Pattern matching, resource
  28. tracking, powerful resident functions...  The only drawback is that
  29. you MUST have the arp.library (V39!) in your libs:  directory in order
  30. to run Mostra.  Otherwise, a message will be displayed, and Mostra
  31. will refuse to run.  Mostra is also a pure program, i.e.  it can be
  32. made resident.
  33.  
  34. Note that you can run Mostra from Workbench:  called by itself it will
  35. pop the file requester and will show you pictures until you select
  36. CANCEL or close the file requester window.  Otherwise, you can select
  37. multiple icons, or you can change the default tool of your pictures.
  38. Note that if you do this with a CAT or a LIST you will have an
  39. automatic little slideshow.
  40.  
  41. Mostra can process ANY IFF ILBM file (including Photon Paint files,
  42. excellence!  files etc.); this means not only IFF ILBM FORMs, but also
  43. nested ILBM, FTXT, FORMs, CATs, LISTs and PROPs!  It will always try
  44. to find the screen type that fits the best, and won't give up if you
  45. want to see 1x1 brushes or VERY large pictures:  Tom tried up to
  46. 5120x4096 (Thanks Tom).  In any case, you can force the screen type
  47. with several options.
  48.  
  49. One of the major features in this release is direct support for SHAM
  50. and indirect support for Dynamic HAM and Dynamic Hi-Res.  Note that
  51. you get *FULL* SHAM support--you can scroll around SHAM pictures in
  52. little screens!  Of course vertical movement requires a *LOT* of work
  53. for your Amiga.  For Dynamic Hi-Res and Dynamic HAM Mostra will call
  54. NewTek's Dyna-Show, that must be in one of your search paths (the
  55. simplest way to accomplish this is putting Dyna-Show in your C:
  56. directory).  You can this way look to every kind of picture, but with
  57. Dynamic modes you lose some of Mostra's powerful features, e.g.  the
  58. screen sizing.  However, all principal functions are implemented.
  59. Including Dyna-Show-like code in Mostra would have increased its size
  60. too much.  Maybe the next release I'll think about it.
  61.  
  62.  
  63. To get the syntax in AmigaDOS/ARP style type:
  64.  
  65.      M ?
  66.  
  67. This will produce the input template:
  68.  
  69.      Files/...,A=ALL/s,R=REPEAT/s,Q=QUIET/s,NOFASTDRAW/s,
  70.      C=CENTER/s,B=BLACKBACKGROUND/s,W=Width/k,H=Height/k,CYCLE/s,
  71.      Secs/k,Fade/k,NO=NOSTARTUP/s,Batch/k,
  72.      N=NOMOUSE/s,F=FREEMOUSE/s,NA=NOACTIVATE/s,DB=DOUBLEBUFFERING/s,
  73.      HIRES/s,LACE/s,LORES/s,NOLACE/s,HAM/s,HALFBRITE/s:
  74.  
  75. If you ask for more help by typing "?" again, you will see:
  76.  
  77. Mostra 1.0 © 1990 Sebastiano Vigna
  78. Usage: M <wildcards [...] | !> [ALL] [REPEAT] [QUIET] [NOFASTDRAW]
  79.         [CENTER] [BLACKBACKGROUND] [WIDTH n] [HEIGHT n] [CYCLE]
  80.         [SECS time] [FADE speed] [NOSTARTUP] [BATCH file]
  81.         [NOMOUSE] [FREEMOUSE] [NOACTIVATE] [DOUBLEBUFFERING]
  82.         [HIRES | LORES] [LACE | NOLACE] [HAM | HALFBRITE]
  83.  
  84. The same help is displayed if you call Mostra with no arguments.
  85.  
  86. Mostra's first argument is a list of patterns (or file names) as long
  87. as you want; you will get every picture whose name matches one of the
  88. patterns.
  89.  
  90. Alternatively, you can type only the "!" character, and Mostra will
  91. display the famous Heath File Requester, allowing you to scan the
  92. entire file system.
  93.  
  94. When you're tired of looking at the picture, move the mouse pointer to
  95. the very top of the screen and press the right button (you can also
  96. press the RETURN, SPACE or ESCAPE keys).  You can drag or depth-
  97. arrange the screen with the left mouse button (the gadgets are
  98. invisible, but they really are there!).  TAB will toggle on/off color
  99. cycling.  To stop pattern matching or IFF scanning use CTRL-C at any
  100. moment.
  101.  
  102. If the screen size is less than the size of the picture, you can move
  103. around with cursor keys by themselves (moving by 8 pixels) or in
  104. combination with the ALT (16 pixels, lowest=weakest), SHIFT (64
  105. pixels), or CTRL (128 pixels, highest=strongest) keys.  A noteworthy
  106. feature of Mostra is that the picture is NOT decrunched all at one
  107. time in a very large chunk of memory; instead, a fast LM routine
  108. decrunches the file in real-time every time you move (the routine
  109. could be faster, but it has lots of controls to get rid of damaged IFF
  110. BODY chunks; safety always first).  This is not as fast as the
  111. memory-eating method, but I think it's MUCH better!  Very large
  112. pictures (like 800x900) will be shown in a full screen (generated on
  113. the fly at Workbench size) which you can move around.  Overscan
  114. pictures will retain their size of it's not greater than 400x300
  115. lo-res pixels (400x250 on a NTSC Amiga).  For hi-res pictures, there
  116. is also a 704 pixel width limit due to Intuition.  Small brushes will
  117. be shown in a minimum 256x128 pixel screen.  Of course, moving
  118. vertically with SHAM pictures involves a high system overhead, since
  119. CopperLists are continuously built and deleted.
  120.  
  121. A weird effect of this method is that you can see pictures that can't
  122. even be *LOADED* into your Amiga.  Let's suppose you have a really
  123. crunched picture; the BODY chunk and a 256x256 lo-res screen could
  124. take much less space than the decrunched picture, so you could create
  125. pictures that only Mostra could let you see in all of their parts.
  126. Why you would want to do this, well, that's another matter.
  127.  
  128. If you're looking at a Dynamic HAM/Dynamic Hi-Res picture, remember
  129. that you're dealing with Dyna-Show, and not with Mostra.  To exit you
  130. must simply press a key or a mouse button.  Remember also that all
  131. other task are frozen.
  132.  
  133.  
  134. Then we have a lot of options (parentheses show how to shorten 'em):
  135.  
  136.  -  ALL (A) recursively scans all of the subdirectories during the
  137.     wildcard search.
  138.  
  139.  -  REPEAT (R) will endlessly restart from the first pattern when it
  140.     has finished with the last; if you used the "!" line arguments,
  141.     the file requester will pop up after every picture until you
  142.     CANCEL or close.
  143.  
  144.  -  QUIET (Q) turns off all messages except in case of error.
  145.  
  146.  -  NOFASTDRAW leaves the program at priority 0; by default, Mostra
  147.     will surround the BODY decrunching operations with a
  148.     SetTaskPri(1).  This will not lock the system, but in a
  149.     multitasking situation Mostra will perform quickly when needed.
  150.  
  151.  -  CENTER (C) will force the screen to be centered (640x200 pictures
  152.     on PAL screens look so ugly...) and will use overscan if
  153.     necessary.
  154.  
  155.  -  BLACKBACKGROUND (B) will create a 0-bitplane (almost no memory
  156.     consumed!) black screen that will stay until you saw the last
  157.     picture.  This is for aesthetic purposes only.
  158.  
  159.  -  WIDTH and HEIGHT (W,H) want an argument that specifies the
  160.     dimensions of the viewing screen.  However, Mostra is an
  161.     intelligent program, and will almost always find the correct
  162.     screen by itself.  WARNING:  dimensions allowed are from 64 to
  163.     1024, at your own risk.  Your Amiga won't crash, but weird things
  164.     can happen...  (Please note that SHAM vertical sizes will be
  165.     rounded to the next even number).
  166.  
  167.  -  CYCLE will automatically activate color cycling on every picture.
  168.     Usually this happens only by request, through TAB.
  169.  
  170.  -  SECS must be followed by a number between 0 and 1000 (the zero
  171.     delay was a request from a BIXen).  Mostra will display the
  172.     picture for the number of seconds specified, but you can skip it
  173.     with mouse, RETURN, SPACE, and ESCAPE keys as always or stop the
  174.     show with CTRL-C.  Cursor keys are disabled.  Greatly reworked on
  175.     Warren's request.
  176.  
  177.  -  FADE lets you specify a speed for pictures to FADE in and out.
  178.     Valid numbers are 1 to 4, with four the slowest.  Note that HAM
  179.     pictures can't be faded.
  180.  
  181.  -  NOMOUSE (N) will hide the mouse pointer while Mostra is displaying
  182.     a picture.
  183.  
  184.  -  FREEMOUSE (F) will let you pass from one picture to another by
  185.     clicking either of the mouse buttons at any position on the
  186.     screen.
  187.  
  188.  -  NOACTIVATE (NA) will inhibit the activation of the picture
  189.     screens, so you can keep on typing on your current screen.  This
  190.     was a request from Tom.
  191.  
  192.  -  DOUBLEBUFFERING (DB) sets a double buffering show mode:  while a
  193.     new picture is being loaded you see the old one, no Workbench
  194.     pop-up or black screens.  Eats lots of memory, too.  Again, a
  195.     request from Tom.  (NOTE:  it's canceled if you call the file
  196.     requester; if a picture requiring Dyna-Show is encountered, the
  197.     current screen will be closed, in order to get as much free memory
  198.     as possible:  you may consider using also BLACKBACKGROUND to
  199.     prevent Workbench appereance.)
  200.  
  201. Centering is no longer performed via Preferences, so if you move the
  202. screen the centering will go away.  NOSTARTUP and BATCH options will
  203. be discussed later.
  204.  
  205. Now, the graphics options.  You can force all screens to be HIRES or
  206. LORES, LACE or NOLACE, HAM or HALFBRITE.  Note that if Mostra finds a
  207. six bitplane picture with no indications (no CAMG chunk), it won't set
  208. the HAM flag by default.  These flags are "dumb," that is, they'll do
  209. exactly what you say, even if it is meaningless.  However, if you use
  210. both HALFBRITE and HAM together, only the former will take place.
  211.  
  212. Note that all of the options after QUIET won't have any effect on
  213. pictures shown through Dyna-Show, except for BLACKBACKGROUND and SECS.
  214.  
  215. And now, some examples:
  216.  
  217.  
  218. M MyPics:* SECS 5 FADE 1 NOMOUSE BLACKBACKGROUND REPEAT CENTER ALL
  219.  
  220. will generate a real (and endless!) slide show of the pictures in the
  221. MyPics: dir and in all its subdirs, centered and with no mouse pointer
  222. hanging around.  In order to stop the slide show, you must press
  223. CTRL-C.
  224.  
  225.  
  226. M df0:*.image df0:pictures/*.pic HIRES LACE
  227.  
  228. will show the files ending with .image on the drive df0: and the
  229. files ending with .pic in the directory df0:pictures.  Mostra will be
  230. forced to use high resolution, interlaced screens.  Setting the HIRES
  231. flag on pictures with more than 4 bitplanes usually leads you to see
  232. absolutely nothing.
  233.  
  234.  
  235. M dh0:hirespic LORES NOLACE
  236.  
  237. will show a hi-res picture in lo-res ("zooming in").  You can move
  238. around with the cursor keys as described above.
  239.  
  240. WIDTH and HEIGHT can be useful when you have a picture that cannot be
  241. displayed because there's not enough Chip RAM (you get the "Can't open
  242. Screen" error message).  In such a case, try:
  243.  
  244.  
  245. M pic WIDTH 128 HEIGHT 128
  246.  
  247. This will usually allow you to at least get a peek at something.
  248.  
  249.  
  250.  
  251.  
  252.                           Advanced features
  253.  
  254. For maximum flexibility, Mostra allows you to use "startup" files and
  255. "startup" ToolTypes, with which you can configure the program to suit
  256. your tastes.
  257.  
  258. There is a standard startup file, called S:Startup-Mostra.  Mostra
  259. will search for it when run from CLI.  The format of this file is
  260. *EXACTLY* the same as the Mostra line format minus the command name
  261. ("M").  Commands may be spread out over several lines or gathered
  262. together onto a single line.  Every switch or keyword in the startup
  263. file will act as a default, and will be toggled or superseded by any
  264. command line arguments.  Command line switches will act as toggles (if
  265. your startup file has the keyword ALL and you say "M * ALL", you
  266. *WON'T* go into subdirectories), while keywords simply assert the new
  267. value (if you have "fade 1" in your startup file and you say "fade 3"
  268. in the command line, your pictures will be faded at speed 3).
  269.  
  270. Two options concern startup files:
  271.  
  272.  -  NOSTARTUP inhibit the search for startup files, useful if you have
  273.     one of them and you want to specify your options from scratch; it
  274.     can be shortened with "NO".
  275.  
  276.  -  BATCH wants a complete path/filename that Mostra will use as
  277.     startup file.
  278.  
  279. From the WB side, you can write the startup options in the ToolTypes
  280. of the Mostra icon, and it will use them.  The format is the same of
  281. Startup-Mostra.  Please note that "FADE=1", "WIDTH=352" are valid, but
  282. "FREEMOUSE=ON" is not; use only "FREEMOUSE".
  283.  
  284. Or you can set the first ToolType of a project icon to STARTUP and put
  285. your options in the following lines; the project picture file will be
  286. shown with those options when you double-click its icon.  You can do
  287. the same thing with an icon that has no related file, and put some
  288. wildcards in the ToolType.  The wildcards will then be shown with
  289. those options.  If you don't put in wildcards, you get a "style" icon:
  290. you can SHIFT click some icons, SHIFT click the "style" icon (in
  291. *THIS* order) and then SHIFT double-click the Mostra icon (or directly
  292. SHIFT double-click the last icon, if its default tool is Mostra):  you
  293. will see the selected picture files with the options specified in the
  294. style icon.  The style icon by itself will pop up the file requester.
  295. Please note that even an icon with wildcards can be used as a style
  296. icon because multiple selections supersede wildcards.
  297.  
  298. I know, it seems a little twisted, but using it you'll find, instead,
  299. that it's the way you'd think.
  300.  
  301. WARNING:  strange interactions can take place.  If you have some
  302. picture icons, and you SHIFT click all but one of them and then you
  303. SHIFT double click the last *AND* the last picture icon you clicked
  304. had some STARTUP options, you will see *ALL* of the pictures with
  305. those options.  Right?
  306.  
  307. For curious/tech/interested people, here is the exact algorithm:
  308.  
  309. 1) If sm_NumArgs > 1 (the user started Mostra with al least an icon
  310. argument), check if sm_ArgList[1] (the first "real" argument) has
  311. ToolTypes with first ToolType = "STARTUP".  If so, scan the whole
  312. ToolTypes list like a command line, accepting mixed commands on a
  313. single ToolType as well as separated commands in separated ToolTypes.
  314.  
  315. 2) If 1) goes wrong, check the Mostra icon ToolTypes, and take them as
  316. a command line.  (Note:  STARTUP is not requested.)
  317.  
  318. 3) Now, if sm_NumArgs > 1, check every sc_ArgList[i] with i>0 and if
  319. there is a related file (*NOT* a .info file!) generate a list of
  320. arguments as if the user entered them manually, *SUPERSEDING* eventual
  321. filenames/wildcards found in 1) and 2).
  322.  
  323. Now, examples, by means of common problems:
  324.  
  325.  
  326. 1) "I have a hundred pictures on my 360M hard disk, and I've organized
  327. them in a few groups.  How can I make simple slideshows, with each
  328. group separate?"
  329.  
  330. Simple:  Create a project icon for each group, and add a ToolType
  331. "STARTUP".  Then add a ToolType like "PICS:Group1/* ALL SECS 5 CENTER"
  332. to choose your options, set the default tool to "C:M" (or wherever you
  333. put it) and double-click (of course, this must be done with every
  334. group icon).  DON'T give the icons the same name as a directory, or
  335. Mostra will collapse in confusion.
  336.  
  337.  
  338. 2) "I want to always see the black screen when I start from WB."
  339.  
  340. Set a Mostra ToolType to "BLACKBACKGROUND".
  341.  
  342.  
  343. 3) "I have some pictures.  Sometimes I want to see a few of them with
  344. a full screen and no mouse, sometimes with a 128x128 screen, sometimes
  345. centered."
  346.  
  347. Create three "style" icons.  Each icon must have as its first ToolType
  348. "STARTUP", and the following ones must be something like "NOMOUSE",
  349. "WIDTH 128 HEIGHT 128" and "CENTER".  The default tool must be "C:M".
  350. When you want to see in a certain style, SHIFT click the picture icons
  351. and *THEN* SHIFT double-click the style icon you desire.
  352.  
  353.  
  354. 4) "I'd like to click my pics one at a time, each one with different
  355. options.  I'd like also to see them in irregular groups, each picture
  356. with its options."
  357.  
  358. You need a psycho-analyst, not Mostra.
  359.  
  360.  
  361.  
  362.                             Credits, etc.
  363.  
  364. I am proud to announce that Mostra worked perfectly with .LBM files
  365. from an MS-DOS game, loaded directly from the original disk (via
  366. CrossDos, of course).
  367.  
  368. I wish to thank some people, first of all the ARP team for the
  369. arp.library and John Toebes at Lattice for the best Amiga C.  Speed
  370. and compactness of Mostra come from the fabulous 5.04 release.  Dulcis
  371. in fundo (I like *SO* much the Latin!) thanks to Luca Spada (the
  372. SkyLink SysOp) for his enthusiasm about my previous Show program; he
  373. persuaded me to create Mostra 1.0.
  374.  
  375. Also I would thank all of the BIXens that encouraged me someway or
  376. helped me to find bugs.  Great help with SHAM came from Warren Block
  377. and Jamie Purdon (something still has to be fixed...).  The new
  378. centering code comes from an example by Willy Langeveld.  Erik
  379. Quackenbush made me aware of a big bug.  Dan Ten Ton suggested the new
  380. name (don't wonder, he knows the Italian!) but the pointer came also
  381. from Dave Quick (only, he doesn't know the Italian...).  Wes Howe
  382. pushed me to improve the diagnostics.  Tom Rokicki, Roger Uzun, Dan,
  383. Warren and Luca helped me to beta-test and they suggested new options.
  384. Warren also checked the docs.  Keith Hopkins gave me the icon.
  385. Finally, Tom sent me the greatest compliments 8-).  Etc.  etc., I
  386. surely missed someone...  it's the *BEST* programming environment in
  387. the world!
  388.  
  389. If you find any bugs please write me or leave me a message at BIX.
  390.  
  391. This software is not public domain.  It is shareware:  you should send
  392. me $20 (or more, why not?) if you find it useful (BIXfriends are of
  393. course free).  Please don't send checks drawn on a US bank, they're
  394. almost impossible to cash.  I'd prefer postal money orders, currency
  395. or checks drawn on an italian bank.
  396.  
  397. If you have access to a TeX system, you can print a copy of the TeX
  398. "Mostra.tex" file that comes with the program.  Anyway, if you spent a
  399. good part of your time preparing and printing documents, I'd suggest
  400. you to take a look at AmigaTeX, a wonderful package from Radical Eye
  401. Software.
  402.  
  403. This software is provided "AS IS" without warranty of any kind, either
  404. expressed or implied.  By using Mostra, you agree to accept the entire
  405. risk as to the quality and performance of the program.  Any liability
  406. will be limited exclusively to product replacement.  Mostra is freely
  407. distributable as long as all of its files are included in their
  408. original form without additions, deletions, or modifications of any
  409. kind.  (I *HATE* all of this legal stuff, but one never knows...)
  410.  
  411. Dyna-Show © 1990 NewTek is a show program that features Dynamic modes
  412. display.
  413.  
  414. I hope Mostra will help you to enjoy your Amiga even more (if
  415. possible).
  416.  
  417.  
  418. Sebastiano Vigna
  419. BIX: svigna
  420. Via Valparaiso, 18
  421. 20144 MILANO Italia
  422.